<# # It is recommended to test the script on a local machine for its purpose and effects. # ManageEngine Endpoint Central will not be responsible for any # damage/loss to the data/setup based on the behavior of the script. # Description: Script is designed To Specify a Minimum PIN Length of Password complexity using Registry Editor # Configuration Type - COMPUTER # Note: Enter a number between 4 to 127 in the PIN length # Refer: https://www.tenforums.com/tutorials/80805-specify-maximum-minimum-pin-length-windows-10-a.html # Limitation: If the registry values are changed but not taking effect, please reach out to Windows support. #> # Define the registry path and value $regPath = "HKLM:\SOFTWARE\Policies\Microsoft\PassportForWork\PINComplexity" $valueName = "MinimumPINLength" $valueData = 6 # Adjust this value as per your requirement # Check if the registry path exists if (-not (Test-Path $regPath)) { # If the registry path does not exist, create it New-Item -Path $regPath -Force } # Set the registry value Set-ItemProperty -Path $regPath -Name $valueName -Value $valueData Write-Host "Minimum PIN Length of Password complexity Registry key $valueName set to $valueData at $regPath"